package com.hdax.dm.entity.item;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "dm_item_type")
public class ItemType {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    private String itemType;
    private Long level;
    private Long parent;
    private String aliasName;
    @TableField(value = "`key`")
    private Long key;
    @TableField(exist = false)//数据库表不存在该字段
    private List<ItemType> children;
    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
}
